import java.util.Scanner;


public class ReverseWords {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    System.out.println(reverse(scanner.nextLine()));
  }

  private static String reverse(String input) {
    String[] array = input.split(" ");
    StringBuilder builder = new StringBuilder();

    for (int i = array.length - 1; i > 0; i--) {
      builder.append(array[i]);
      builder.append(" ");
    }

    builder.append(array[0]);

    return builder.toString();
  }

}
